package com.ddwl.user.job;

import com.ddwl.user.service.UserLevelService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * UserJob.java的实现描述：用户相关定时任务
 * @author wenbin
 */
@Component
public class UserJob {

    @Resource
    private UserLevelService userLevelService;

    /**
     * 分销员等级任务
     * 
     */
    @XxlJob("userLevelJob")
    public ReturnT<String> userLevelJobHandler(String param) {
        XxlJobLogger.log("开始执行更新分销员等级任务");
        userLevelService.correctUserLevel();
        return ReturnT.SUCCESS;
    }

}
